package com.qiqichangting.changting.service.Impl;



import com.qiqichangting.changting.mapper.UserMapper;
import com.qiqichangting.changting.pojo.User;
import com.qiqichangting.changting.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.scheduling.annotation.Schedules;
import org.springframework.stereotype.Service;


@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Autowired
    private RedisTemplate redisTemplate;



    @Override
    public User login(String username, String password) {
        User user = userMapper.login(username, password);

        return user;
    }

    @Override
    public User findByUser(String username) {
        User byUser = userMapper.findByUser(username);
        return byUser;
    }

    @Override
    public boolean addUser(User user) {

        boolean falg = userMapper.addUser(user);

        return falg;
    }


}
